package ink.yql.model;

import java.io.Serializable;

/**
 * @author YQL
 */
public class Project implements Serializable {
    /**
     * id
     */
    private Integer pid;
    /**
     * 标题
     */
    private String ptitle;
    /**
     * 小标题
     */
    private String psmallTitle;
    /**
     * 简介
     */
    private String psummary;
    /**
     * 标签
     */
    private Integer plabel;
    /**
     *  发起省份
     */
    private String pprovince;
    /**
     *  发起城市
     */
    private String pcity;
    /**
     *  开始时间
     */
    private String pstartTime;
    /**
     *  结束时间
     */
    private String pendTime;
    /**
     *  目标金额
     */
    private Double ptargetMoney;
    /**
     *  项目详情
     */
    private String pdetail;
    /**
     *  项目状态 0草稿 1未开始 2筹备金额中 3筹备金额达到目标 4筹备结束
     */
    private Integer pstatus;

    public Project(Integer pid, String ptitle, String psmallTitle, String psummary, Integer plabel, String pprovince, String pcity, String pstartTime, String pendTime, Double ptargetMoney, String pdetail, Integer pstatus) {
        this.pid = pid;
        this.ptitle = ptitle;
        this.psmallTitle = psmallTitle;
        this.psummary = psummary;
        this.plabel = plabel;
        this.pprovince = pprovince;
        this.pcity = pcity;
        this.pstartTime = pstartTime;
        this.pendTime = pendTime;
        this.ptargetMoney = ptargetMoney;
        this.pdetail = pdetail;
        this.pstatus = pstatus;
    }

    public Project() {
    }

    public static ProjectBuilder builder() {
        return new ProjectBuilder();
    }

    public Integer getPid() {
        return this.pid;
    }

    public String getPtitle() {
        return this.ptitle;
    }

    public String getPsmallTitle() {
        return this.psmallTitle;
    }

    public String getPsummary() {
        return this.psummary;
    }

    public Integer getPlabel() {
        return this.plabel;
    }

    public String getPprovince() {
        return this.pprovince;
    }

    public String getPcity() {
        return this.pcity;
    }

    public String getPstartTime() {
        return this.pstartTime;
    }

    public String getPendTime() {
        return this.pendTime;
    }

    public Double getPtargetMoney() {
        return this.ptargetMoney;
    }

    public String getPdetail() {
        return this.pdetail;
    }

    public Integer getPstatus() {
        return this.pstatus;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public void setPtitle(String ptitle) {
        this.ptitle = ptitle;
    }

    public void setPsmallTitle(String psmallTitle) {
        this.psmallTitle = psmallTitle;
    }

    public void setPsummary(String psummary) {
        this.psummary = psummary;
    }

    public void setPlabel(Integer plabel) {
        this.plabel = plabel;
    }

    public void setPprovince(String pprovince) {
        this.pprovince = pprovince;
    }

    public void setPcity(String pcity) {
        this.pcity = pcity;
    }

    public void setPstartTime(String pstartTime) {
        this.pstartTime = pstartTime;
    }

    public void setPendTime(String pendTime) {
        this.pendTime = pendTime;
    }

    public void setPtargetMoney(Double ptargetMoney) {
        this.ptargetMoney = ptargetMoney;
    }

    public void setPdetail(String pdetail) {
        this.pdetail = pdetail;
    }

    public void setPstatus(Integer pstatus) {
        this.pstatus = pstatus;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof Project)) return false;
        final Project other = (Project) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$pid = this.getPid();
        final Object other$pid = other.getPid();
        if (this$pid == null ? other$pid != null : !this$pid.equals(other$pid)) return false;
        final Object this$ptitle = this.getPtitle();
        final Object other$ptitle = other.getPtitle();
        if (this$ptitle == null ? other$ptitle != null : !this$ptitle.equals(other$ptitle)) return false;
        final Object this$psmallTitle = this.getPsmallTitle();
        final Object other$psmallTitle = other.getPsmallTitle();
        if (this$psmallTitle == null ? other$psmallTitle != null : !this$psmallTitle.equals(other$psmallTitle))
            return false;
        final Object this$psummary = this.getPsummary();
        final Object other$psummary = other.getPsummary();
        if (this$psummary == null ? other$psummary != null : !this$psummary.equals(other$psummary)) return false;
        final Object this$plabel = this.getPlabel();
        final Object other$plabel = other.getPlabel();
        if (this$plabel == null ? other$plabel != null : !this$plabel.equals(other$plabel)) return false;
        final Object this$pprovince = this.getPprovince();
        final Object other$pprovince = other.getPprovince();
        if (this$pprovince == null ? other$pprovince != null : !this$pprovince.equals(other$pprovince)) return false;
        final Object this$pcity = this.getPcity();
        final Object other$pcity = other.getPcity();
        if (this$pcity == null ? other$pcity != null : !this$pcity.equals(other$pcity)) return false;
        final Object this$pstartTime = this.getPstartTime();
        final Object other$pstartTime = other.getPstartTime();
        if (this$pstartTime == null ? other$pstartTime != null : !this$pstartTime.equals(other$pstartTime))
            return false;
        final Object this$pendTime = this.getPendTime();
        final Object other$pendTime = other.getPendTime();
        if (this$pendTime == null ? other$pendTime != null : !this$pendTime.equals(other$pendTime)) return false;
        final Object this$ptargetMoney = this.getPtargetMoney();
        final Object other$ptargetMoney = other.getPtargetMoney();
        if (this$ptargetMoney == null ? other$ptargetMoney != null : !this$ptargetMoney.equals(other$ptargetMoney))
            return false;
        final Object this$pdetail = this.getPdetail();
        final Object other$pdetail = other.getPdetail();
        if (this$pdetail == null ? other$pdetail != null : !this$pdetail.equals(other$pdetail)) return false;
        final Object this$pstatus = this.getPstatus();
        final Object other$pstatus = other.getPstatus();
        if (this$pstatus == null ? other$pstatus != null : !this$pstatus.equals(other$pstatus)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof Project;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $pid = this.getPid();
        result = result * PRIME + ($pid == null ? 43 : $pid.hashCode());
        final Object $ptitle = this.getPtitle();
        result = result * PRIME + ($ptitle == null ? 43 : $ptitle.hashCode());
        final Object $psmallTitle = this.getPsmallTitle();
        result = result * PRIME + ($psmallTitle == null ? 43 : $psmallTitle.hashCode());
        final Object $psummary = this.getPsummary();
        result = result * PRIME + ($psummary == null ? 43 : $psummary.hashCode());
        final Object $plabel = this.getPlabel();
        result = result * PRIME + ($plabel == null ? 43 : $plabel.hashCode());
        final Object $pprovince = this.getPprovince();
        result = result * PRIME + ($pprovince == null ? 43 : $pprovince.hashCode());
        final Object $pcity = this.getPcity();
        result = result * PRIME + ($pcity == null ? 43 : $pcity.hashCode());
        final Object $pstartTime = this.getPstartTime();
        result = result * PRIME + ($pstartTime == null ? 43 : $pstartTime.hashCode());
        final Object $pendTime = this.getPendTime();
        result = result * PRIME + ($pendTime == null ? 43 : $pendTime.hashCode());
        final Object $ptargetMoney = this.getPtargetMoney();
        result = result * PRIME + ($ptargetMoney == null ? 43 : $ptargetMoney.hashCode());
        final Object $pdetail = this.getPdetail();
        result = result * PRIME + ($pdetail == null ? 43 : $pdetail.hashCode());
        final Object $pstatus = this.getPstatus();
        result = result * PRIME + ($pstatus == null ? 43 : $pstatus.hashCode());
        return result;
    }

    public String toString() {
        return "Project(pid=" + this.getPid() + ", ptitle=" + this.getPtitle() + ", psmallTitle=" + this.getPsmallTitle() + ", psummary=" + this.getPsummary() + ", plabel=" + this.getPlabel() + ", pprovince=" + this.getPprovince() + ", pcity=" + this.getPcity() + ", pstartTime=" + this.getPstartTime() + ", pendTime=" + this.getPendTime() + ", ptargetMoney=" + this.getPtargetMoney() + ", pdetail=" + this.getPdetail() + ", pstatus=" + this.getPstatus() + ")";
    }

    public static class ProjectBuilder {
        private Integer pid;
        private String ptitle;
        private String psmallTitle;
        private String psummary;
        private Integer plabel;
        private String pprovince;
        private String pcity;
        private String pstartTime;
        private String pendTime;
        private Double ptargetMoney;
        private String pdetail;
        private Integer pstatus;

        ProjectBuilder() {
        }

        public Project.ProjectBuilder pid(Integer pid) {
            this.pid = pid;
            return this;
        }

        public Project.ProjectBuilder ptitle(String ptitle) {
            this.ptitle = ptitle;
            return this;
        }

        public Project.ProjectBuilder psmallTitle(String psmallTitle) {
            this.psmallTitle = psmallTitle;
            return this;
        }

        public Project.ProjectBuilder psummary(String psummary) {
            this.psummary = psummary;
            return this;
        }

        public Project.ProjectBuilder plabel(Integer plabel) {
            this.plabel = plabel;
            return this;
        }

        public Project.ProjectBuilder pprovince(String pprovince) {
            this.pprovince = pprovince;
            return this;
        }

        public Project.ProjectBuilder pcity(String pcity) {
            this.pcity = pcity;
            return this;
        }

        public Project.ProjectBuilder pstartTime(String pstartTime) {
            this.pstartTime = pstartTime;
            return this;
        }

        public Project.ProjectBuilder pendTime(String pendTime) {
            this.pendTime = pendTime;
            return this;
        }

        public Project.ProjectBuilder ptargetMoney(Double ptargetMoney) {
            this.ptargetMoney = ptargetMoney;
            return this;
        }

        public Project.ProjectBuilder pdetail(String pdetail) {
            this.pdetail = pdetail;
            return this;
        }

        public Project.ProjectBuilder pstatus(Integer pstatus) {
            this.pstatus = pstatus;
            return this;
        }

        public Project build() {
            return new Project(pid, ptitle, psmallTitle, psummary, plabel, pprovince, pcity, pstartTime, pendTime, ptargetMoney, pdetail, pstatus);
        }

        public String toString() {
            return "Project.ProjectBuilder(pid=" + this.pid + ", ptitle=" + this.ptitle + ", psmallTitle=" + this.psmallTitle + ", psummary=" + this.psummary + ", plabel=" + this.plabel + ", pprovince=" + this.pprovince + ", pcity=" + this.pcity + ", pstartTime=" + this.pstartTime + ", pendTime=" + this.pendTime + ", ptargetMoney=" + this.ptargetMoney + ", pdetail=" + this.pdetail + ", pstatus=" + this.pstatus + ")";
        }
    }
}
